import { request, request2 } from '@/utils/request'
const key = '433435ba22462e523fef8b4a65336fa5'
//根据关键字获取数据
export const getMapData = (keyword) => {
  return request({
    url: 'geocode/geo',
    params: {
      key,
      address: keyword,
      output: 'JSON',
    },
  })
}
//根据ip返回数据
export const getIpData = () => {
  return request({
    url: 'ip',
    params: {
      key,
      output: 'JSON',
    },
  })
}
//根据adcode返回矢量图层范围数据
export const getVectorData = (adcode) => {
  return request2({
    url: `geojson?code=${adcode}`,
  })
}
